package com.dzh.service;

import com.dzh.dao.BookMapper;
import com.dzh.dao.StudentMapper;
import com.dzh.pojo.Books;
import com.dzh.pojo.Student;
import com.dzh.pojo.StudentRes;

import java.util.List;

public class StudentServiceImpl implements StudentService{
    private StudentMapper studentMapper;

    public void setStudentMapper(StudentMapper studentMapper) {
        this.studentMapper = studentMapper;
    }

    @Override
    public int addStudent(StudentRes student) {
        return studentMapper.addStudent(student);
    }

    @Override
    public int deleteStudentById(int sno) {
        return studentMapper.deleteStudentById(sno);
    }

    @Override
    public int updateStudent(Student student) {
        return studentMapper.updateStudent(student);
    }

    @Override
    public Student queryStudentById(int sno) {
        return studentMapper.queryBStudentById(sno);
    }

    @Override
    public List<StudentRes> queryAllStudent() {
        return studentMapper.queryAllStudent();
    }
}
